<?php

/**
 * The PHP cast type 'enumeration' class
 * 
 * Contains allowed PHP type casts as described here:
 * http://php.net/manual/en/language.types.type-juggling.php
 * 
 * @package UC_PHPCodeModel
 * @author Uros Calakovic
 */

class CastType
{
    const INT = 'int';
    const INTEGER = 'integer';
    const BOOL = 'bool';
    const BOOLEAN = 'boolean';
    const FLOAT = 'float';
    const DOUBLE = 'double';
    const REAL = 'real';
    const STRING = 'string';
    const _ARRAY = 'array';
    const OBJECT = 'object';
    const _UNSET = 'unset';
    const BINARY = 'binary';
    
    static public function Defines($const)
    {
        $cls = new ReflectionClass(__CLASS__);
        foreach($cls->getConstants() as $key=>$value)
        {
            if($value == $const)
            {
                return true;
            }
        }
        
        return false;
    }    
}

?>
